import { createRouter, createWebHashHistory } from 'vue-router';
import routes from './routes.js';

// const modules = import.meta.globEager('../views/*/index.vue');
// const routes = [];
// for (const path in modules) {
//   routes.push({
//     path: `/${path.split('/')[2]}`,
//     component: modules[path].default
//   });
// }

// routes.unshift({
//   path: '/',
//   redirect: '/home'
// });

const router = createRouter({
  history: createWebHashHistory(),
  routes
});

export default router;
